 function specialTextValidate() { 
      var code;   
      var character;   
      var err_msg = "该输入域不能包含下列字符之一:\n \\ / : * ? \" < > | & , ";   
      if (document.all)   
      {   
          code = window.event.keyCode;   
      } else {   
          code = arguments.callee.caller.arguments[0].which;   
      }   
      var character = String.fromCharCode(code);   
     var txt = new RegExp("[\\.\\>,\\<,\\:,\\;,\\'',\\\,\\|,\\},\\{,\\],\\[,\\=,\\+,\\ ,\\),\\(,\\^,\\#,\\%,\\$,\\#,\\@,\\!,\\*,\\&,\\\\,\\/,\\?,\\|,\\:,\\<,\\>,\"]");   
      if (txt.test(character)) {   
          if (document.all) {   
              window.event.returnValue = false;   
          } else {   
              arguments.callee.caller.arguments[0].preventDefault();   
          }   
      }  
  } 
 
 function numberValidate() { 
     var code;   
     var character;   
     if (document.all)   
     {   
         code = window.event.keyCode;   
     } else {   
         code = arguments.callee.caller.arguments[0].which;   
     }   
     var character = String.fromCharCode(code);   
    var txt = new RegExp("^[0-9]*$");   
     if (!txt.test(character)) {   
         if (document.all) {   
             window.event.returnValue = false;   
         } else {   
             arguments.callee.caller.arguments[0].preventDefault();   
         }   
     }  
 } 
 
 function moneyValidate(id){
	 $("#"+id).keyup(function () {
         var reg = $(this).val().match(/^-?\d*\.?\d{0,2}/);
         var txt = '';
         if (reg != null) {
             txt = reg[0];
         }
         $(this).val(txt);
         
          
     }).change(function () {
         $(this).keypress();
         var v = $(this).val();
         if (/\.$/.test(v))
         {
             $(this).val(v.substr(0, v.length - 1));
         }
     }); 
 }
 

 function ajaxLoading(msg){
	 
	 $("<div class=\"datagrid-mask\"></div>").css({display:"block",width:"100%",height:$(window).height()}).appendTo("body"); 
	 $("<div class=\"datagrid-mask-msg\"></div>").html(msg).appendTo("body").css({display:"block",left:($(document.body).outerWidth(true) - 190) / 2,top:($(window).height() - 45) / 2}); 
 } 
 function ajaxLoadEnd(){ 
	     $(".datagrid-mask").remove(); 
	     $(".datagrid-mask-msg").remove();             
} 